package com.foreknow.demo10;

public class ClassB implements InterfaceA {
    @Override
    public int method(int n) {
        int sum = 1;
        for(int i = 1;i<=n;i++){
            sum*=i;
        }
        return sum;
    }

    public static void main(String[] args) {
        InterfaceA a = new ClassB();
        int s = a.method(3);
        System.out.println(s);
    }
}
